import re
if 1:
	AA = 'RPY 01 0 . 0 945'
	RE = '(\S\S\S) (\d+) (\d+)\ ([\.\*]) (\d+) (\d+)( \d+)?'
	M  = re.match(RE, AA)
	print M, M.groups()
